﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Prism.Regions;
using Infrastucture.Controllers;

namespace TimeSplicerModule.Controllers
{
    public interface ICategoryController : IController
    { }

    public class CategoryController : Controller, ICategoryController
    {
        public void NavigateToListView()
        {
            Uri uri = new Uri(typeof(Views.CategoryListView).Name, UriKind.Relative);
            RegionManager.RequestNavigate(Infrastucture.RegionNames.MainRegion, uri);
        }

        public void NavigateToItemView()
        {
            Uri uri = new Uri(typeof(Views.CategoryView).Name, UriKind.Relative);
            RegionManager.RequestNavigate(Infrastucture.RegionNames.MainRegion, uri);
        }


        public void NavigateToItemView(Guid itemGuid)
        {
            Uri uri = new Uri(typeof(Views.CategoryView).Name + "?categoryGuid=" + itemGuid.ToString(), UriKind.Relative);
            RegionManager.RequestNavigate(Infrastucture.RegionNames.MainRegion, uri);
        }
    }
}
